package cn.wolfcode.luowowo.website.web.controller;

import cn.wolfcode.luowowo.common.anno.RequiresLogin;
import cn.wolfcode.luowowo.member.domain.Userinfo;
import cn.wolfcode.luowowo.member.service.IUserinfoService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/userinfo")
public class UserinfoController {

    @Reference
    private IUserinfoService userinfoService;

    @RequiresLogin
    @RequestMapping("/getById")
    @ResponseBody
    public Userinfo getById(Long id) {
        Userinfo byId = userinfoService.getById(id);
        return byId;
    }
}
